-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make GOOS=js GOARCH=wasm a possible build target #573
base: main
Are you sure you want to change the base?
Conversation
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
Incidentally, I believe this closes issue #186 |
@Jorropo when you take a look at this, then feel free to suggest actual writing to in-memory files. I just don't see any reason, but if there is then just holler. |
I would like to support WASM too but I want to you know that you havn't added anything to the test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think a new filewriter_wasm
file is correct.
The STD emulates a unix filesystem on top of JS:
https://cs.opensource.google/go/go/+/master:src/os/file_unix.go;l=5?q=openFileNolog&ss=go%2Fgo
@@ -1,4 +1,6 @@ | |||
//go:build darwin || linux || netbsd || openbsd || freebsd || dragonfly || js || wasip1 | |||
//go:build darwin || linux || netbsd || openbsd || freebsd || dragonfly || (js && !wasm) || wasip1 | |||
// +build darwin linux netbsd openbsd freebsd dragonfly js,!wasm wasip1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, it's been since 1.18 that +build
isn't used anymore.
I think you should upgrade your version of go. 😉 🙂
Hepp! Good feedback. A little busy here, but I'll follow up. |
As writing files is not really applicable in WebAssembly create a noop filewriter to make compilation possible.